package cn.exrick.service;

import cn.exrick.pojo.TbQuestion;
import cn.exrick.pojo.common.DataTablesResult;
import cn.exrick.pojo.front.QuestionCommentResult;
import cn.exrick.pojo.front.QuestionResult;
import cn.exrick.utils.mybatis.Page;

/**
 * @Description:
 */
public interface QuestionService {

    DataTablesResult getQuestionPage(int draw, int start, int length, String search, Long catId,
                                     String minDate, String maxDate, String orderCol, String orderDir);

    int save(TbQuestion tbQuestion);

    int updateStatus(Long id);

    Page<QuestionResult> getQuestionPageForApi(int currentPage, int size, Long memberId, Integer type, Long category, String search);

    QuestionResult getDetailForApi(Long questionId);

    int saveComment(Long memberId, Long questionId, String content);

    Page<QuestionCommentResult> getQuestionCommentPageForApi(int currentPage, int size, Long questionId);

}
